﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Chatu.ControlLider.Web.Models.Domain.EmployeeLaborDay>" %>

<asp:Content ID="indexTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Control de Entrada y Salida
</asp:Content>

<asp:Content ID="indexContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Control de Entrada y Salida</h2>
    <fieldset>
        <legend>Datos Personales</legend>
        <p>
            Cedula: <%= Html.Encode(Model.Cedula) %>
        </p>
        <p>
            Nombre Completo: <%= Html.Encode(Model.FullName) %>
        </p>
        <p>
            Cargo: <%= Html.Encode(Model.JobTitle) %>
        </p>
    </fieldset>
    <br />
    <fieldset>
        <legend>Datos de la Jornada Laboral</legend>
        <p>
            Guardias: <%= Model.LaborData.Guardia.ToGuardiaValue() %>
        </p>
        <p>
            Tickets: <%= Model.LaborData.Ticket %>
        </p>
        <p>
            Bono: <%= Model.LaborData.Bono.ToBonoValue() %>
        </p>
    </fieldset>
    <br />
    <% using (Html.BeginForm("Attendance", "Home")) { %>
        <%= Html.Hidden("Cedula", Model.Cedula) %>
        <%= Html.SubmitButton("entrada", "Registrar Entrada", Model.LaborData.InDate.HasValue, "return confirm('Desea registrar Entrada?');") %>&nbsp;&nbsp;
        <%= Html.SubmitButton("salida", "Registrar Salida", (!Model.LaborData.InDate.HasValue) || Model.LaborData.OutDate.HasValue, "return confirm('Desea registrar Salida?');")%>
    <% } %>
</asp:Content>